#ifndef HSI_LOOKUP_H
#define HSI_LOOKUP_H

#include "type.h"

#define MAKE_RGB565(r,g,b) ((WORD)((((WORD)r&0xf8)<<8) | (((WORD)g&0xfc)<<3) | (((WORD)b&0xf8)>>3))) // make RGB565 from r,g,b

extern WORD h_lookup[65536];
extern BYTE i_lookup[65536];
extern BYTE s_lookup[65536];

void rgb888to565(LPBYTE rgb888, LPWORD rgb565, int width, int height);
void rgb2hsi(LPWORD rgb565, LPWORD hImg, LPBYTE sImg, LPBYTE iImg, int width, int height);
void rgb888toHsi(LPBYTE rgb888, LPWORD hImg, LPBYTE sImg, LPBYTE iImg, int width, int height);

#endif //#define HSI_LOOKUP_H

